#ifndef UNIT_HPP_INCLUDED
#define UNIT_HPP_INCLUDED

#include "citizen_fwd.hpp"
#include "city_fwd.hpp"
#include "government_fwd.hpp"
#include "unit_fwd.hpp"
#include "unit_type_fwd.hpp"

class unit
{
public:
	unit(const_unit_type_ptr type, government_ptr owner, city_ptr home, citizen_ptr c);
	~unit();
	void new_turn();
	void draw(int x, int y);
	const const_unit_type_ptr& type() const { return type_; }
	const government_ptr& owner() const { return owner_; }
	const city_ptr& home() const { return home_; }
	void set_loc(const hex::location& loc);
	const hex::location& loc() const { return loc_; }
	void set_selected(bool selected) { selected_ = selected; }
	int total_movement() const;
	int movement_left() const;
	void deplete_movement(int amount);
	void disband();

	void unshroud();
private:
	const_unit_type_ptr type_;
	government_ptr owner_;
	city_ptr home_;
	citizen_ptr citizen_;
	hex::location loc_;
	int movement_left_;
	mutable int selected_;
};

#endif
